<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>管理员界面</title>

    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
    <!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css" integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous">

    <style type="text/css" rel="stylesheet">
        .data_list{
            border: 1px solid #E5E5E5;
            padding: 10px;
            background-color: #FDFDFD;
            margin-top: 15px;
        }

        .data_list .data_list_title{
            font-size: 15px;
            font-weight: bold;
            border-bottom: 1px solid #E5E5E5;
            padding-bottom: 10px;
            padding-top: 5px;
        }

        .data_list .data_list_title img{
            vertical-align: top;
        }

        .data_list .diary_datas{
            padding: 5px;
        }

        .data_list .diary_datas ul{
            list-style-type: none;
        }

        .data_list .diary_datas ul li{
            margin-top: 15px;
        }

        .data_list .user_image img{
            padding-top:10px;
            width: 180px;;
            height: 220px;;
        }

        .data_list .user_image{
            text-align: center;
        }

        .data_list .nickName , .data_list .userSign{
            text-align: center;
        }

        .img{
            width:100px;
            height: 100px;
        }
    </style>


</head>
<body>
<div class="container">
    <nav class="navbar navbar-inverse">
        <p class="navbar-text">Signed in as Mark Otto</p>

        <button type="button" class="btn btn-default btn-lg" style="float:right "  onclick = "window.location.href = 'login.jsp'>
            <span class="glyphicon glyphicon-home aria-hidden="true"></span> <a href="login.jsp">返回登录</a>
        </button>
    </nav>

    <div class="row">
        <div class="col-md-9">
            <iframe src="CurdServlet" frameborder="0" name="onlineUser" width="100%" height="700px" scrolling="auto"></iframe>
        </div>


        <div class="col-md-3">
            <div class="data_list">
                <div class="data_list_title">
                    <img src="${pageContext.request.contextPath}/static/images/user_icon.png"/>
                    个人中心 &nbsp;&nbsp;(姓名：${currentUser_man.username})
                </div>
                <div class="user_image">
                    <img src="${pageContext.request.contextPath}/static/userImages/${currentUser_man.src}">
                    <%--<img src="${pageContext.request.contextPath}/static/userImages/${currentUser_man.position}">--%>
                </div>
                <div class="nickName">
                   <h3><strong>职位：${currentUser_man.position}</strong></h3>
                </div>
                <div class="userSign">
                    <h4>上班宣言:</h4>
                    "${currentUser_man.talk}"
                </div>

            </div>
            <div class="data_list">
                <div class="data_list_title">
                    <img src="${pageContext.request.contextPath}/static/images/byType_icon.png"/>
                    此次操作时间：
                </div>

                <div class="diary_datas">
                    <strong>${datetime}</strong>
                    <div id="div"></div>
                    <img src="" id="img" class="img">
                </div>

            </div>
            <%--<div class="data_list">--%>
                <%--<div class="data_list_title">--%>
                    <%--<img src="${pageContext.request.contextPath}/static/images/byDate_icon.png"/>--%>
                    <%--老八蜜汁小汉堡管理界面--%>
                <%--</div>--%>
            <%--</div>--%>
        </div>
    </div>

</div>

<script>
    var div = document.getElementById('div');
    var img = document.getElementById('img');
    var date = new Date();
    var hour = date.getHours();
    if (hour>=8 && hour<=12){
        div.innerHTML='上午好';
        img.src='${pageContext.request.contextPath}/img/morning.gif';
    }else if (hour>12 && hour<=19){
        div.innerHTML='下午好';
        img.src='${pageContext.request.contextPath}/img/afternoon.gif';
    }else if (hour>19 && hour<=24){
        div.innerHTML='晚上好';
        img.src='${pageContext.request.contextPath}/img/night.gif';
    }else {
        div.innerHTML='疯啦，这个点玩电脑';
    }
</script>

</body>
</html>